﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Enum;

namespace EntityModel
{
    /// <summary>
    /// 走访记录表
    /// </summary>
    [Table("C1")]
    public class EM_Interview
    {
        public EM_Interview()
        {
            this.Id = Guid.NewGuid();
            this.AddTime = DateTime.Now;
            this.DelTime = DateTime.Now;
        }


        /// <summary>
        /// 数据唯一标识符
        /// </summary>
        [Column("C001")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Required]
        public Guid Id { get; set; }

        /// <summary>
        /// 走访地点
        /// </summary>
        [Column("C002")]
        [StringLength(50)]
        [Required]
        public string? Location { get; set; }

        /// <summary>
        /// 走访的形式：0：电话   1：问卷    2：面谈
        /// </summary>
        [Column("C003")]
        [Required]
        public Form Form { get; set; }

        /// <summary>
        /// 姓氏
        /// </summary>
        [Column("C004")]
        [StringLength(20)]
        [Required]
        public string? FirstName { get; set; }

        /// <summary>
        /// 名字
        /// </summary>
        [Column("C005")]
        [StringLength(30)]
        [Required]
        public string? LastName { get; set; }

        /// <summary>
        /// 居住地址
        /// </summary>
        [Column("C006")]
        [StringLength(150)]
        [Required]
        public string? Address { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        [Column("C007")]
        [Required]
        public int Age { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Column("C008")]
        [Required]
        public bool Gender { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>
        [Column("C009")]
        [Required]
        public DateTime AddTime { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        [Column("C010")]
        [Required]
        public DateTime DelTime { get; set; }
    }
}
